#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i, n) for (int i = 1; i <= n; ++i)
const int N = 1e5 + 7;
int n, v[N], ans;
int main()
{
    freopen("duel.in", "r", stdin);
    freopen("duel.out", "w", stdout);
    cin >> n;
    rep(i, n)
    {
        int x;
        cin >> x;
        ++v[x];
    }
    for (int i = 1; i <= 100000; ++i)
    {
        if (v[i])
        {
            int sum = v[i];
            for (int j = i - 1; j >= 1; --j)
            {
                if (v[j])
                {
                    if (v[j] >= sum)
                    {
                        v[j] -= sum, sum = 0;
                        break;
                    }
                    else
                        sum -= v[j], v[j] = 0;
                }
            }
        }
    }
    for (int i = 100000; i >= 1; --i)
        ans += v[i];
    cout << ans;
    return 0;
}
